import 'package:flutter/material.dart';



class SlideShow extends StatefulWidget {
  final String src;
  final VoidCallback onTap;
  SlideShow({@required this.src, @required this.onTap});
  @override
  _SlideShowState createState() => _SlideShowState();
}

class _SlideShowState extends State<SlideShow> {
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      child: Container(
        height: 200.0,
        padding: const EdgeInsets.all(8.0),
        child: Image.network(widget.src,fit:BoxFit.cover ,),
      ),
      // 点击事件
      onTap: widget.onTap,
    );
  }
}
